<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 5 - 请客吃饭
        var money = +prompt('输入金额:');
        if (money >= 2000) {
            alert('请大家吃西餐');
        } else if (money >= 1500 && money < 2000) {
            alert('请大家吃快餐');
        } else if (money >= 1000 && money < 1500) {
            alert('请大家喝饮料');
        } else if (money >= 500 && money < 1000) {
            alert('请大家吃棒棒糖');
        } else {
            alert('否则提醒班长下次把钱带够');
        }

    </script>
</head>

<body>

</body>

</html>